package com.zy.cat.entity.mall;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import com.taobao.api.internal.mapping.ApiField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.RequiredArgsConstructor;

@Entity
@Table(name = "zy_cat_tlj_order_ori", indexes = { @Index(name = "rsid", columnList = "rsid"),
		@Index(name = "pid", columnList = "pid"), @Index(name = "dstatus", columnList = "dstatus") })
@Data
@RequiredArgsConstructor
@ApiModel("9趣猫淘礼金商品实体类")
public class TKTLJGoodsOrders implements Serializable {

	private static final long serialVersionUID = 31513612331993271L;

	@Id
	@Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '淘礼金订单实例ID'")
	@ApiModelProperty(value = "淘礼金订单实例ID")
	private String rsid;

	@Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '投放code'")
	@ApiModelProperty("投放code")
	private String vcode;

	@Column(columnDefinition = "VARCHAR(32) NOT NULL COMMENT '用户ID'")
	@ApiModelProperty(value = "用户ID")
	private String pid;

	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '商品ID'")
	@ApiModelProperty(value = "商品ID")
	private String sid;

	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '交易状态：-1.失效、0.待领取、1.已领取、2.已付款、3.已到账'")
	@ApiModelProperty(value = "交易状态：-1.失效、0.待领取、1.已领取、2.已付款、3.已到账")
	private int dstatus;

	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '是否微信通知过：0.否、1.是'")
	@ApiModelProperty(value = "是否微信通知过：0.否、1.是")
	private int noticed;

	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '淘礼金申请金额（分）'")
	@ApiModelProperty("淘礼金申请金额（分）")
	private long tlj;

	@ApiModelProperty("淘礼金淘口令")
	private String tkl;

	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '领取类型：0.新人补贴、1.邀请好友补贴'")
	@ApiModelProperty(value = "领取类型：0.新人补贴、1.邀请好友补贴")
	private int ttype;

	@ApiField("alipay_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '引导成交金额'")
	private String alipayAmount;

	@ApiField("fp_refund_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '退款红包金额'")
	private String fpRefundAmount;

	@ApiField("fp_refund_num")
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '退款红包个数'")
	private long fpRefundNum;

	@ApiField("pre_commission_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '引导预估佣金金额'")
	private String preCommissionAmount;

	@ApiField("refund_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '失效回退金额'")
	private String refundAmount;

	@ApiField("refund_num")
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '失效回退红包个数'")
	private long refundNum;

	@ApiField("unfreeze_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '解冻金额'")
	private String unfreezeAmount;

	@ApiField("unfreeze_num")
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT ' 解冻红包个数'")
	private long unfreezeNum;

	@ApiField("use_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '红包核销金额'")
	private String useAmount;

	@ApiField("use_num")
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '红包核销个数'")
	private long useNum;

	@ApiField("win_amount")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '红包领取金额'")
	private String winAmount;

	@ApiField("win_num")
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '0' COMMENT '红包领取个数'")
	private long winNum;

	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-' COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间")
	private String ctime;

	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-' COMMENT '更改时间'")
	@ApiModelProperty(value = "更改时间")
	private String ltime;

	@Column(columnDefinition = "VARCHAR(100) DEFAULT '-' COMMENT '说明'")
	@ApiModelProperty("说明")
	private String info;

	/* 淘礼金申请记录 */
	public TKTLJGoodsOrders(String rsid, String vcode, String pid, String sid, int dstatus, long tlj, String tkl,
			int ttype) {
		super();
		this.rsid = rsid;
		this.vcode = vcode;
		this.pid = pid;
		this.sid = sid;
		this.dstatus = dstatus;
		this.tlj = tlj;
		this.tkl = tkl;
		this.ttype = ttype;
	}
}
